#ifndef SCAN_H
#define SCAN_H

#include <stdio.h>
#include "flv.h"
#include "context.h"

typedef enum {
	BEFORE,
	HDR,
	TAG,
	AFTER,
} scan_phase;

typedef enum {
	ERROR = -1,
	OUTPUT, /* if this hdr or tag needs to be outputed by caller */
	DISCARD,
} scan_verdict;

typedef scan_verdict (*scan_callback)(scan_phase phase, struct tagbuf *b,
				struct context *ctx);

int scan(FILE *in, FILE *out, scan_callback cb);

#endif /* SCAN_H */
